<?php
include('config.php');
$type_name = isset($_POST['type_name']) ? $_POST['type_name'] : '';
$rs = $mysql->selectList('type',"type_name='{$type_name}'");
$where = "type_id={$rs[0]['type_id']}";
$keyword = isset($_POST['keyword']) ? trim($_POST['keyword']) : '';
if($keyword){
	$where .= " and breed_name like '%{$keyword}%'";
}
$result = $mysql->selectList('breed',$where);
if($result){
	foreach ($result as $k=>$v){
		echo '<label style="display:block;" ondblclick="dblName('.$v['breed_id'].')" id="change_name'.$v['breed_id'].'" onclick="add_name_change_backgroud('.$v['breed_id'].')"><input type="radio"  name="radiobutton" value="'.$v['breed_name'].'" />'.$v['breed_name'].'</label>';
	}
}
